import Vue from 'vue'
import App from './App.vue'
import router from './router/index.js'
import ElementUI from 'element-ui';
import echarts from 'echarts'
import 'element-ui/lib/theme-chalk/index.css';
import './components'  // 导入公共样式
import animated from 'animate.css' // npm install animate.css --save安装，在引入
import './assets/scss/style.scss'  // 导入公共样式
import 'echarts/extension/bmap/bmap'
import store from './store'

Vue.use(animated)
Vue.use(ElementUI);
Vue.prototype.$echarts = echarts;

Vue.config.productionTip = false

var blackList = ['/accomplishment/point','/accomplishment/ability','/analysis/teacher','/sysmanage/index','/tablemanage/index','/analysismanage/index']

router.beforeEach((to, from, next) => {
    // console.log(to,"to");

    if(document.getElementById('el-main')){
      document.getElementById('el-main').scrollTop = 0
    }
    
    if(!blackList.includes(to.path)){
      next();
    }else{
      next({ path: from.path });
    }
});


new Vue({
  render: h => h(App),
  store,
  router,
}).$mount('#app')



